package com.dragon.modules.yuegou.query.order;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.order.OrderPayEntity;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 订单支付 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2019-10-08 11:05:58
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class OrderPayQuery extends OrderPayEntity implements Query<OrderPayEntity> {

    /** 查询条件 */
	@JsonUnwrapped(prefix = "orderNo")
	private Condition<String> orderNoCondition;

    /** 总共支付金额查询条件 */
	@JsonUnwrapped(prefix = "total")
	private Condition<BigDecimal> totalCondition;

    /** 悦币支付金额查询条件 */
	@JsonUnwrapped(prefix = "payYueCoin")
	private Condition<BigDecimal> payYueCoinCondition;

    /** 悦卡支付金额查询条件 */
	@JsonUnwrapped(prefix = "payYueCard")
	private Condition<BigDecimal> payYueCardCondition;

    /** 微信支付金额查询条件 */
	@JsonUnwrapped(prefix = "payWechat")
	private Condition<BigDecimal> payWechatCondition;

    /** 支付宝支付金额查询条件 */
	@JsonUnwrapped(prefix = "payAlipay")
	private Condition<BigDecimal> payAlipayCondition;

    /** 银行卡支付金额（暂未使用）查询条件 */
	@JsonUnwrapped(prefix = "payBank")
	private Condition<BigDecimal> payBankCondition;

    /** 现金支付金额（暂未使用，线下支付的金额）查询条件 */
	@JsonUnwrapped(prefix = "payCash")
	private Condition<BigDecimal> payCashCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "payPoint")
	private Condition<Integer> payPointCondition;

    /** 支付时间查询条件 */
	@JsonUnwrapped(prefix = "payTime")
	private Condition<LocalDateTime> payTimeCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public OrderPayQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public OrderPayQuery(OrderPayEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public OrderPayQuery(OrderPayQuery other) {
		super(other);
		if(other.orderNoCondition != null) {
			this.orderNoCondition = other.orderNoCondition.copy();
		}
		if(other.totalCondition != null) {
			this.totalCondition = other.totalCondition.copy();
		}
		if(other.payYueCoinCondition != null) {
			this.payYueCoinCondition = other.payYueCoinCondition.copy();
		}
		if(other.payYueCardCondition != null) {
			this.payYueCardCondition = other.payYueCardCondition.copy();
		}
		if(other.payWechatCondition != null) {
			this.payWechatCondition = other.payWechatCondition.copy();
		}
		if(other.payAlipayCondition != null) {
			this.payAlipayCondition = other.payAlipayCondition.copy();
		}
		if(other.payBankCondition != null) {
			this.payBankCondition = other.payBankCondition.copy();
		}
		if(other.payCashCondition != null) {
			this.payCashCondition = other.payCashCondition.copy();
		}
		if(other.payPointCondition != null) {
			this.payPointCondition = other.payPointCondition.copy();
		}
		if(other.payTimeCondition != null) {
			this.payTimeCondition = other.payTimeCondition.copy();
		}
	}

	@Override
	public QueryWrapper<OrderPayEntity> toQueryWrapper() {
		QueryWrapper<OrderPayEntity> wrapper = new QueryWrapper<>(this);
		if (orderNoCondition != null) {
			orderNoCondition.toWrapper(wrapper, COL_ORDER_NO);
		}
		if (totalCondition != null) {
			totalCondition.toWrapper(wrapper, COL_TOTAL);
		}
		if (payYueCoinCondition != null) {
			payYueCoinCondition.toWrapper(wrapper, COL_PAY_YUE_COIN);
		}
		if (payYueCardCondition != null) {
			payYueCardCondition.toWrapper(wrapper, COL_PAY_YUE_CARD);
		}
		if (payWechatCondition != null) {
			payWechatCondition.toWrapper(wrapper, COL_PAY_WECHAT);
		}
		if (payAlipayCondition != null) {
			payAlipayCondition.toWrapper(wrapper, COL_PAY_ALIPAY);
		}
		if (payBankCondition != null) {
			payBankCondition.toWrapper(wrapper, COL_PAY_BANK);
		}
		if (payCashCondition != null) {
			payCashCondition.toWrapper(wrapper, COL_PAY_CASH);
		}
		if (payPointCondition != null) {
			payPointCondition.toWrapper(wrapper, COL_PAY_POINT);
		}
		if (payTimeCondition != null) {
			payTimeCondition.toWrapper(wrapper, COL_PAY_TIME);
		}
		return wrapper;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return orderNoCondition 查询条件
	 */
	public Condition<String> orderNo() {
		this.orderNoCondition = new Condition<>();
		return this.orderNoCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return orderNoCondition 查询条件
	 */
	public Condition<String> getOrderNoCondition() {
		return orderNoCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param orderNoCondition 查询条件
	 */
	public void setOrderNoCondition(Condition<String> orderNoCondition) {
		this.orderNoCondition = orderNoCondition;
	}

	/**
	 * 构造并返回总共支付金额查询条件
	 * 
	 * @return totalCondition 总共支付金额查询条件
	 */
	public Condition<BigDecimal> total() {
		this.totalCondition = new Condition<>();
		return this.totalCondition;
	}
	
	/**
	 * 获取总共支付金额查询条件
	 * 
	 * @return totalCondition 总共支付金额查询条件
	 */
	public Condition<BigDecimal> getTotalCondition() {
		return totalCondition;
	}

	/**
	 * 设置总共支付金额查询条件
	 * 
	 * @param totalCondition 总共支付金额查询条件
	 */
	public void setTotalCondition(Condition<BigDecimal> totalCondition) {
		this.totalCondition = totalCondition;
	}

	/**
	 * 构造并返回悦币支付金额查询条件
	 * 
	 * @return payYueCoinCondition 悦币支付金额查询条件
	 */
	public Condition<BigDecimal> payYueCoin() {
		this.payYueCoinCondition = new Condition<>();
		return this.payYueCoinCondition;
	}
	
	/**
	 * 获取悦币支付金额查询条件
	 * 
	 * @return payYueCoinCondition 悦币支付金额查询条件
	 */
	public Condition<BigDecimal> getPayYueCoinCondition() {
		return payYueCoinCondition;
	}

	/**
	 * 设置悦币支付金额查询条件
	 * 
	 * @param payYueCoinCondition 悦币支付金额查询条件
	 */
	public void setPayYueCoinCondition(Condition<BigDecimal> payYueCoinCondition) {
		this.payYueCoinCondition = payYueCoinCondition;
	}

	/**
	 * 构造并返回悦卡支付金额查询条件
	 * 
	 * @return payYueCardCondition 悦卡支付金额查询条件
	 */
	public Condition<BigDecimal> payYueCard() {
		this.payYueCardCondition = new Condition<>();
		return this.payYueCardCondition;
	}
	
	/**
	 * 获取悦卡支付金额查询条件
	 * 
	 * @return payYueCardCondition 悦卡支付金额查询条件
	 */
	public Condition<BigDecimal> getPayYueCardCondition() {
		return payYueCardCondition;
	}

	/**
	 * 设置悦卡支付金额查询条件
	 * 
	 * @param payYueCardCondition 悦卡支付金额查询条件
	 */
	public void setPayYueCardCondition(Condition<BigDecimal> payYueCardCondition) {
		this.payYueCardCondition = payYueCardCondition;
	}

	/**
	 * 构造并返回微信支付金额查询条件
	 * 
	 * @return payWechatCondition 微信支付金额查询条件
	 */
	public Condition<BigDecimal> payWechat() {
		this.payWechatCondition = new Condition<>();
		return this.payWechatCondition;
	}
	
	/**
	 * 获取微信支付金额查询条件
	 * 
	 * @return payWechatCondition 微信支付金额查询条件
	 */
	public Condition<BigDecimal> getPayWechatCondition() {
		return payWechatCondition;
	}

	/**
	 * 设置微信支付金额查询条件
	 * 
	 * @param payWechatCondition 微信支付金额查询条件
	 */
	public void setPayWechatCondition(Condition<BigDecimal> payWechatCondition) {
		this.payWechatCondition = payWechatCondition;
	}

	/**
	 * 构造并返回支付宝支付金额查询条件
	 * 
	 * @return payAlipayCondition 支付宝支付金额查询条件
	 */
	public Condition<BigDecimal> payAlipay() {
		this.payAlipayCondition = new Condition<>();
		return this.payAlipayCondition;
	}
	
	/**
	 * 获取支付宝支付金额查询条件
	 * 
	 * @return payAlipayCondition 支付宝支付金额查询条件
	 */
	public Condition<BigDecimal> getPayAlipayCondition() {
		return payAlipayCondition;
	}

	/**
	 * 设置支付宝支付金额查询条件
	 * 
	 * @param payAlipayCondition 支付宝支付金额查询条件
	 */
	public void setPayAlipayCondition(Condition<BigDecimal> payAlipayCondition) {
		this.payAlipayCondition = payAlipayCondition;
	}

	/**
	 * 构造并返回银行卡支付金额（暂未使用）查询条件
	 * 
	 * @return payBankCondition 银行卡支付金额（暂未使用）查询条件
	 */
	public Condition<BigDecimal> payBank() {
		this.payBankCondition = new Condition<>();
		return this.payBankCondition;
	}
	
	/**
	 * 获取银行卡支付金额（暂未使用）查询条件
	 * 
	 * @return payBankCondition 银行卡支付金额（暂未使用）查询条件
	 */
	public Condition<BigDecimal> getPayBankCondition() {
		return payBankCondition;
	}

	/**
	 * 设置银行卡支付金额（暂未使用）查询条件
	 * 
	 * @param payBankCondition 银行卡支付金额（暂未使用）查询条件
	 */
	public void setPayBankCondition(Condition<BigDecimal> payBankCondition) {
		this.payBankCondition = payBankCondition;
	}

	/**
	 * 构造并返回现金支付金额（暂未使用，线下支付的金额）查询条件
	 * 
	 * @return payCashCondition 现金支付金额（暂未使用，线下支付的金额）查询条件
	 */
	public Condition<BigDecimal> payCash() {
		this.payCashCondition = new Condition<>();
		return this.payCashCondition;
	}
	
	/**
	 * 获取现金支付金额（暂未使用，线下支付的金额）查询条件
	 * 
	 * @return payCashCondition 现金支付金额（暂未使用，线下支付的金额）查询条件
	 */
	public Condition<BigDecimal> getPayCashCondition() {
		return payCashCondition;
	}

	/**
	 * 设置现金支付金额（暂未使用，线下支付的金额）查询条件
	 * 
	 * @param payCashCondition 现金支付金额（暂未使用，线下支付的金额）查询条件
	 */
	public void setPayCashCondition(Condition<BigDecimal> payCashCondition) {
		this.payCashCondition = payCashCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return payPointCondition 查询条件
	 */
	public Condition<Integer> payPoint() {
		this.payPointCondition = new Condition<>();
		return this.payPointCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return payPointCondition 查询条件
	 */
	public Condition<Integer> getPayPointCondition() {
		return payPointCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param payPointCondition 查询条件
	 */
	public void setPayPointCondition(Condition<Integer> payPointCondition) {
		this.payPointCondition = payPointCondition;
	}

	/**
	 * 构造并返回支付时间查询条件
	 * 
	 * @return payTimeCondition 支付时间查询条件
	 */
	public Condition<LocalDateTime> payTime() {
		this.payTimeCondition = new Condition<>();
		return this.payTimeCondition;
	}
	
	/**
	 * 获取支付时间查询条件
	 * 
	 * @return payTimeCondition 支付时间查询条件
	 */
	public Condition<LocalDateTime> getPayTimeCondition() {
		return payTimeCondition;
	}

	/**
	 * 设置支付时间查询条件
	 * 
	 * @param payTimeCondition 支付时间查询条件
	 */
	public void setPayTimeCondition(Condition<LocalDateTime> payTimeCondition) {
		this.payTimeCondition = payTimeCondition;
	}

}
